<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        html,body{

            height: 100%;
        }
        * {
            margin: 0;
            padding: 0;
        }
        table {
            border-collapse: collapse;
            width: 300px;
        }
        thead {
            background-color: skyblue;
        }
        .screen {
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.1);
            position: absolute;
            left: 0;
            top: 0;
        }
        .add {
            width: 400px;
            height: 400px;
            background-color: #fff;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%)
        }
    </style>
</head>
<body>
    <div class="screen">
        <div class="add">
            <p>课程名称:<input type="text"></p>
            <p>所属学院:<input type="text"></p>

            
        </div>
    </div>
    <div class="box">
        <button id='btn'>添加</button>
        <table border='1px'>
            <thead>
                <tr>
                    <th>课程名称</th>
                    <th>所属学院</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>javascript</td>
                    <td>前端</td>
                    <td><a href="#">delete</a></td>
                </tr>
                <tr>
                    <td>python</td>
                    <td>后端</td>
                    <td><a href="#">delete</a></td>
                </tr>
                <tr>
                    <td>java</td>
                    <td>后端</td>
                    <td><a href="#">delete</a></td>
                </tr>
            </tbody>
        </table>
    </div>
    <script src='../jquery-1.12.4.js'></script>
    <script>
        $(function(){
            $('table a').click(function(){
                $(this).parent().parent().remove()
            })
        })
    </script>
</body>
</html>
